package by.plisitsa.railway.datamodel;

import java.sql.Time;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

@Entity
public class Subroute extends AbstractEntity {
	
	@Column
	private Time sequence;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Route.class)
	private Route route;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Distance.class)
	private Distance distance;

	public Time getSequence() {
		return sequence;
	}

	public void setSequence(Time sequence) {
		this.sequence = sequence;
	}

	public Route getRoute() {
		return route;
	}

	public void setRoute(Route route) {
		this.route = route;
	}

	public Distance getDistance() {
		return distance;
	}

	public void setDistance(Distance distance) {
		this.distance = distance;
	}
	
	}
